<template>
  <h1>粉丝数量：{{ formatFans }}</h1>
</template>
<script>
import { computed, ref } from 'vue'
export default {
 name: 'App',
  setup() {
    const fans = ref(189987)
    // 利用计算属性进行计算
    const formatFans = computed(() => {
      return ((fans.value)/10000).toFixed(2) + '粉丝'
    })
    return {
      fans,
      formatFans
    }
  }
}
</script>